//
//  ZCMainViewController.m
//  Unicom
//
//  Created by increase on 16/1/12.
//  Copyright © 2016年 increase. All rights reserved.
//

#import "ZCMainViewController.h"
#import "ZCResourceMainViewController.h"

@interface ZCMainViewController ()

@end

@implementation ZCMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self creatMainUI];
}

- (void)creatMainUI
{
    //设置按钮
    UIButton *setBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    setBtn.frame = CGRectMake(150, 50, 50, 50);
    [setBtn setTitle:@"设置" forState:0];
    [self.view addSubview:setBtn];
    
    //资源清查
    UIButton *resourceClearBtn = [UIButton buttonWithType:UIButtonTypeSystem];
    resourceClearBtn.frame = CGRectMake(100, 100, 50, 50);
    resourceClearBtn.backgroundColor = [UIColor blackColor];
    [self.view addSubview:resourceClearBtn];
    [resourceClearBtn setTitle:@"资源清查" forState:0];
    [resourceClearBtn addTarget:self action:@selector(firstAction) forControlEvents:UIControlEventTouchUpInside];
    
}


#pragma mark - 按钮方法
- (void)firstAction
{
    NSLog(@"资源清查");
    ZCResourceMainViewController *resourceVC = [[ZCResourceMainViewController alloc] init];
    [self.navigationController pushViewController:resourceVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
